<#include "common/main.html">
<#macro bodyId>user-mg</#macro>
<#macro content>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">微信用户列表
        <!--<div class="btns">-->
            <!--<a class="btn btn-success" href="${rc.contextPath}/user/gotoAdd">新增用户</a>-->
        <!--</div>-->
    </h1>
    <div class="tool-bar">
        <div class="filter">
            <form method="get">
                <div class="form-group">

                    <div class="col-sm-12">

                        <span class="label-text">用户ID：&nbsp; &nbsp;&nbsp;</span>
                        <div class="col7">
                            <input class="form-control" name="id" />
                        </div>

                        <span class="label-text">注册手机号：</span>
                        <div class="col7">
                            <input class="form-control" name="phoneNumber" />
                        </div>

                        <button class="btn btn-success">查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>用户ID</th>
                <th>OpenID</th>
                <th>微信昵称</th>
                <th>注册手机号</th>
                <th>图像</th>
                <th>用户类型</th>
                <th class="date">创建日期</th>
            </tr>
            </thead>
            <tbody>
                <#if userList??>
                    <#list userList as weixinUser>
                    <tr>
                        <td>${weixinUser.id}</td>
                        <td>${weixinUser.openId}</td>
                        <td>${weixinUser.nickName}</td>
                        <td>${weixinUser.phoneNumber}</td>
                        <td><#if weixinUser.avatarUrl!=null> <img src="${weixinUser.avatarUrl}" style="width: 20px;height: 20px"/> </#if> </td>
                        <td>${weixinUser.userTypeName}</td>
                        <td>${weixinUser.createTime?number?number_to_datetime?string("yyyy-MM-dd HH:mm")}</td>

                    </tr>
                    </#list>
                </#if>
            </tbody>
        </table>
    </div>
    <#include "common/page.html">
</div>

<script>
    var config = {
        deleteById: "${rc.contextPath}/user/delete",
        updateOnlineStatus: "${rc.contextPath}/user/updateState"
    }
</script>
</#macro>